package com.itheima.basic;

import java.util.Scanner;

public class balance
{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //开发一个简单的健康计算器应用程序，能接受用户输入的体重和身高，并计算BMI指数，并给出相应的健康建议。
        System.out.println("请输入体重：");
        double weight = sc.nextDouble();
        System.out.println("请输入身高：");
        double height = sc.nextDouble();
        double bmi = weight / (height * height);
        System.out.println("BMI指数为：" + bmi);
        if (bmi < 18.5) {
            System.out.println("您是低体重，请 Eat more!");
        } else if (bmi >= 18.5 && bmi < 24.9) {
            System.out.println("您是正常体重，请 Keep up the good work!");
        } else if (bmi >= 24.9 && bmi < 29.9) {
            System.out.println("您是超重，请 Lose some weight.");
        } else {
            System.out.println("您是肥胖，请 Lose some weight.");
        }
    }
}
